﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Decoration.Models.Dto
{
    public class OrderDetailPostDto
    {
        /// <summary>
        /// 产品
        /// </summary>
        public int ProductId { get; set; }

        [MaxLength(50)]
        public string ProductName { get; set; } = null!;

        /// <summary>
        /// 单价
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int Count { get; set; }

        /// <summary>
        /// 小计
        /// </summary>
        public decimal Total { get => Price * Count; }
    }
}
